From 412ce402aee45b9cf898413d82f3e4701b0aa93e Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 6 Sep 2005 16:10:22 +0000 Subject: [PATCH] Avoid warn_unused error on read() return value. Signed-off-by: Keir Fraser --- tools/xenstore/xs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c index ff31244166..5d36a8d642 100644 --- a/tools/xenstore/xs.c +++ b/tools/xenstore/xs.c @@ -628,7 +628,8 @@ bool xs_shutdown(struct xs_handle *h) if (ret) { char c; /* Wait for it to actually shutdown. */ - read(h->fd, &c, 1); + while ((read(h->fd, &c, 1) < 0) && (errno == EINTR)) + continue; } return ret; } -- 2.30.2